<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@page import="java.util.ArrayList"%>
<%@page import="projectodedalo.modelo.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>:: Forum Ideas ::</title>
<script type="text/javascript" src="lib/alertify.js"></script>
<link rel="stylesheet" href="themes/alertify.core.css" />
<link rel="stylesheet" href="themes/alertify.default.css" />
<script src="js/jquery-1.3.2.min.js"></script>
</head>
<body>
	<jsp:include page="cabecera.jsp" flush="true" />
	<div class="container">
		<div class="table-responsive">
			<div class="alert alert-info alert-coupon" align="center"
				style="font-weight: bold;">.:. FORO DE DISCUSION .:.</div>

			<div class="panel panel-default">
				<div class="panel-heading">Panel</div>
				<div class="panel-body">
					<table class="table" cellpadding="0" cellspacing="0">
						<thead>
							<tr>
								<th class="success">&nbsp;</th>
								<th class="success">T&iacute;tulo</th>
								<th class="success">Descripci&oacute;n</th>
							</tr>
						</thead>
						<tbody>
							<%
								Usuario beanusuario = (Usuario) session
										.getAttribute("USUARIO_ACTUAL");

								ArrayList<Idea> beanidea = (ArrayList<Idea>) request
										.getAttribute("lstIdeas");
								if (beanidea != null) {
									for (Idea muestraIdea : beanidea) {
							%>
							<tr class='warning'>
								<td width='10px'><img alt='Brand' src='img/sobre.gif'
									width='17' height='10'></td>
								<td><label style='font-style: oblique; color: blue;'>
										<a
										href="<%=request.getContextPath()%>/CargarDetalleIdeasServlet?subTitulo=<%=muestraIdea.getTituloIdea()%>&test=0&codigo=<%=muestraIdea.getIdIdea()%>"><%=muestraIdea.getTituloIdea()%></a>
								</label><br> <label style="font-style: italic; color: gray;">Usuario:
										<%
										 	if (beanusuario != null) {
										 				out.println(beanusuario.getCorreo().trim());
										 			}
										 %>
								</label></td>
								<td align="right"><label
									style="font-style: normal; color: gray;"><%=muestraIdea.getDescripcionIdea()%></label></td>
							</tr>
							<%
										String msg = (String) request.getAttribute("servletMsg");
										String codigo = (String) request.getAttribute("codigoMsg");
										
										if (codigo.equals("OK")) {
											if (msg != null) {
												out.println("<script>"
														+ "	alertify.success('" + msg + "')"
														+ "</script>");
											}
										}
										
										if (codigo.equals("ERROR")) {
											if (msg != null) {
												out.println("<script>"
														+ "	alertify.error('" + msg + "')"
														+ "</script>");
											}
										}
										
									}	// Fin del for
								} // Fin del if
							%>
						</tbody>
					</table>
				</div>
				<!-- fin panel-heading -->
				<div class="panel-footer" id="msgError" name="msgError">
					<label style="color: blue"><%= request.getAttribute("servletMsg") %></label>
				</div>
			</div>
			<!-- fin panel-body -->
		</div>
	</div>
</body>
</html>